<template>
  <div class="address">
    <el-button size="mini" icon="el-icon-thumb" type="primary" @click="dialogVisible = true">添加地址</el-button>
    <el-table stripe :data="tableData" height="440" style="width: 100%" class="adstab">
      <el-table-column type="index" align="center" :index="indexMethod" width="40"> </el-table-column>
      <el-table-column prop="address_details" label="地址" width="250">
      </el-table-column>
      <el-table-column prop="address_phone" label="手机号码" width="130">
      </el-table-column>
      <el-table-column prop="address_receive" label="收件人" width="100">
      </el-table-column>
      <el-table-column prop="address_addTime" label="添加时间" width="180">
      </el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button icon="el-icon-delete" size="mini" type="danger" @click="delAddress(scope.row._id)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-dialog title="添加地址" :visible.sync="dialogVisible" width="500px" :before-close="handleClose">
      <el-form :label-position="labelPosition" label-width="80px" :model="formLabelAlign">
        <el-form-item label="收件地址:">
          <el-input v-model="formLabelAlign.addressDdetails"></el-input>
        </el-form-item>
        <el-form-item label="收件手机:">
          <el-input v-model="formLabelAlign.addressPhone"></el-input>
        </el-form-item>
        <el-form-item label="收件人:">
          <el-input v-model="formLabelAlign.addressReceive"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" size="mini" @click="addAdress">立即添加</el-button>
          <!-- <el-button size="mini">取消</el-button> -->
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>

<script src="../assets/js/AddressManageView.js"></script>
<style src="../assets/css/AddressManageView.css"scoped></style>